﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;

namespace LogsDownload.Models
{
    public class LogFiles
    {

        List<EventLog> listOfLogs=new List<EventLog>();
        public LogFiles()
        {           
            EventLog[] eventLogsArray = EventLog.GetEventLogs();            
            for (int i = 0; i < eventLogsArray.Length; i++)
            {
                listOfLogs.Add(eventLogsArray[i]);
            }
        }

        public List<EventLog> getLogs()
        {
            return listOfLogs;
        }

        public int getCount()
        {
            return listOfLogs.Count;
        }

    }
}